package ace.module.product.core.impl.dao.entity;

import jakarta.annotation.Nullable;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import ace.cmp.spring.data.jdbc.querydsl.core.annotations.LogicDelete;
import ace.cmp.spring.graphql.core.model.GenericPageContent;
import ace.module.product.api.model.dto.PmsProductCommentContentDto;

/**
* 商品评论内容.
*
* @author Caspar
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = PmsProductCommentContentDto.TABLE_DESC)
@Table(PmsProductCommentContentDto.TABLE_NAME)
public class PmsProductCommentContent implements Serializable, GenericPageContent<Long> {

  @Id
  @Schema(title = PmsProductCommentContentDto.ID_TITLE, description = PmsProductCommentContentDto.ID_DESC)
  private Long id;

  @Schema(title = PmsProductCommentContentDto.PMS_APP_ID_TITLE, description = PmsProductCommentContentDto.PMS_APP_ID_DESC)
  private Long pmsAppId;

  @Schema(title = PmsProductCommentContentDto.SHOP_ID_TITLE, description = PmsProductCommentContentDto.SHOP_ID_DESC)
  private Long shopId;

  @Schema(title = PmsProductCommentContentDto.PRODUCT_ID_TITLE, description = PmsProductCommentContentDto.PRODUCT_ID_DESC)
  private Long productId;

  @Schema(title = PmsProductCommentContentDto.PRODUCT_SKU_ID_TITLE, description = PmsProductCommentContentDto.PRODUCT_SKU_ID_DESC)
  private Long productSkuId;

  @Schema(title = PmsProductCommentContentDto.PRODUCT_COMMENT_ID_TITLE, description = PmsProductCommentContentDto.PRODUCT_COMMENT_ID_DESC)
  private Long productCommentId;

  /**
   * {@link ace.module.product.api.enums.PmsProductCommentContentCommentRoleEnum}
   */
  @Schema(title = PmsProductCommentContentDto.COMMENT_ROLE_TITLE, description = PmsProductCommentContentDto.COMMENT_ROLE_DESC)
  private Integer commentRole;

  @Schema(title = PmsProductCommentContentDto.PARENT_ID_TITLE, description = PmsProductCommentContentDto.PARENT_ID_DESC)
  private Long parentId;

  @Schema(title = PmsProductCommentContentDto.ACCOUNT_ID_TITLE, description = PmsProductCommentContentDto.ACCOUNT_ID_DESC)
  private Long accountId;

  @Size(max = 255)
  @Schema(title = PmsProductCommentContentDto.NICK_NAME_TITLE, description = PmsProductCommentContentDto.NICK_NAME_DESC)
  private String nickName;

  @Schema(title = PmsProductCommentContentDto.AVATAR_TITLE, description = PmsProductCommentContentDto.AVATAR_DESC)
  private String avatar;

  @Size(max = 255)
  @Schema(title = PmsProductCommentContentDto.CONTENT_TITLE, description = PmsProductCommentContentDto.CONTENT_DESC)
  private String content;

  @LogicDelete
  @Schema(title = PmsProductCommentContentDto.DELETE_FLAG_TITLE, description = PmsProductCommentContentDto.DELETE_FLAG_DESC)
  private Long deleteFlag;

  @CreatedDate
  @Schema(title = PmsProductCommentContentDto.CREATE_TIME_TITLE, description = PmsProductCommentContentDto.CREATE_TIME_DESC)
  private Long createTime;

  @LastModifiedDate
  @Schema(title = PmsProductCommentContentDto.UPDATE_TIME_TITLE, description = PmsProductCommentContentDto.UPDATE_TIME_DESC)
  private Long updateTime;

  @Version
  @Schema(title = PmsProductCommentContentDto.ROW_VERSION_TITLE, description = PmsProductCommentContentDto.ROW_VERSION_DESC)
  private Long rowVersion;

}
